home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 4 (Reseller) / Apple Ref. & Pres. Lib.v4.0.iso / 4-Demos / Apple Demos / Tutorials / Macintosh SE⁄30 Training / Apple Macintosh SE⁄30 / Apple Macintosh SE_30 / stack.txt < prev   
Text File  |  1990-03-19  |  10KB  |  244 lines

  1. -- stack: in
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 15
  11. -- first background id: 3987
  12. -- card count: 239
  13. -- first card id: 9977
  14. -- list block id: 129741
  15. -- print block id: 3387
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 2
  19. -- free size: 9504 bytes
  20. -- total size: 598016 bytes
  21. -- stack block size: 6656 bytes
  22. -- created by hypercard version: 0x01208000
  23. -- compacted by hypercard version: 0x01228000
  24. -- modified by hypercard version: 0x01228000
  25. -- opened by hypercard version: 0x01228000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0xEEEAEE00EEAEEE00
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0xFF888888FF888888
  49. -- patterns[23]: 0x0800220080002200
  50. -- patterns[24]: 0x0814224180412214
  51. -- patterns[25]: 0x8000080080000800
  52. -- patterns[26]: 0xCCCC3333CCCC3333
  53. -- patterns[27]: 0x8888888888888888
  54. -- patterns[28]: 0x8844221188442211
  55. -- patterns[29]: 0xAA550000AA550000
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800080008000
  59. -- patterns[33]: 0xFF808080FF808080
  60. -- patterns[34]: 0xFF00FF00FF00FF00
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xAA00800080008000
  63. -- patterns[37]: 0xAAAAAAAAAAAAAAAA
  64. -- patterns[38]: 0xFF80808080808080
  65. -- patterns[39]: 0xF0F0F0F00F0F0F0F
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. --————————————————————————————————————————————————————————————————————
  69. --  Stack created for Apple Computer, Inc.
  70. --  Copyright ¬© 1988 by Apple Computer, Inc.
  71. --  HyperCard construction ‚Äî Chuck Walker.
  72. --  PopUpMenu XFCN by Andrew Gilmartin, Brown University
  73. --————————————————————————————————————————————————————————————————————
  74. --  Begin Stack Script  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  75. --————————————————————————————————————————————————————————————————————
  76. on openStack
  77.  
  78.   if the version < 1.2 then
  79.     answer "This stack requires HyperCard version 1.2." with "Continue" or "Home"
  80.     if it is "Home" then domenu home
  81.   end if
  82.  
  83.   put item 2 of the screenRect into screenTop
  84.   if top of card window < screenTop + 20 then hide menuBar
  85.   hide tool window
  86.   hide pattern window
  87.   hide msg
  88.   resetMap
  89.  
  90. end openStack
  91. --————————————————————————————————————————————————————————————————————
  92. on closeStack
  93.  
  94.   answer "Do you want to save your place?" with "Yes" or "No"
  95.   if it is "No" then put empty into field "footprints" of card "Map"
  96.   pass closeStack
  97.  
  98. end closeStack
  99. --————————————————————————————————————————————————————————————————————
  100. --  intercept keyboard handlers:  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  101. --————————————————————————————————————————————————————————————————————
  102. --  same as clicking the arrow buttons  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  103.  
  104. on arrowKey whatKey
  105.  
  106.   if whatKey = "Left" then click at 442,328
  107.   if whatKey = "Right" then click at 469,328
  108.  
  109. end arrowKey
  110.  
  111. --  same as clicking the return button  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  112.  
  113. on returnKey
  114.  
  115.   click at 498,328
  116.  
  117. end returnKey
  118.  
  119. --  intercept enter key  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  120.  
  121. on enterKey
  122. end enterKey
  123.  
  124. --————————————————————————————————————————————————————————————————————
  125. --  offer help to the lost  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  126.  
  127. on mouseUp
  128.   global clickTime
  129.   if the ticks - clickTime < 50 then exit mouseUp
  130.  
  131.   answer "Click one of the Arrow buttons." with "Help" or "OK"
  132.   if it is "Help" then
  133.     push card
  134.     visual dissolve
  135.     go card "howToUse"
  136.   else exit mouseUp
  137.  
  138. end mouseUp
  139. --————————————————————————————————————————————————————————————————————
  140. -- disable certain menu options which are not appropriate  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  141.  
  142.  
  143. on domenu menu                       --// Added by Medior, Inc. 2/20/90
  144.   global RPStackName
  145.   if menu is in "Home,Quit HyperCard" and RPStackName is not empty then
  146.     set cursor to watch
  147.     put RPStackName into shortname
  148.     repeat until offset(":",shortname) = 0
  149.       delete char 1 to offset(":",shortname) of shortname
  150.     end repeat
  151.     delete last char of shortname
  152.     answer "This will return to "&shortname&"." with "Cancel" or "OK"
  153.     if it is "Cancel" then exit domenu
  154.     set cursor to watch
  155.     lock screen
  156.     go RPStackName
  157.     unlock screen with dissolve
  158.     exit domenu
  159.   else if Menu is in "Message Find... Print Report... Last Prev Next" then
  160.   else pass doMenu
  161. end domenu
  162.  
  163. --————————————————————————————————————————————————————————————————————
  164. -- popUp table of contents menu  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  165.  
  166. on mainMenu
  167.   global clickTime, checkedItem
  168.  
  169.   get the loc of card window
  170.   put item 1 of it into LeftWind
  171.   put item 2 of it into TopWind
  172.   get the rect of target
  173.   put item 1 of it into leftSide
  174.   put item 4 of it into bottomSide
  175.   put (TopWind + bottomSide +(checkedItem * 16) - 16) into hMenuLoc
  176.   put LeftWind + leftSide + 1 into vMenuLoc
  177.  
  178.   get PopUpMenu(field "menuList" of card "Map", checkedItem, hMenuLoc, vMenuLoc)
  179.  
  180.   if it = 1 then
  181.     push card
  182.     go card "Map"
  183.   end if
  184.   if it = 2 then
  185.     push card
  186.     go card "howToUse"
  187.   end if
  188.   if it = 4 then go card "content1"
  189.   if it = 5 then go card "content2"
  190.   if it = 6 then go card "content3"
  191.   if it = 7 then go card "content4"
  192.   if it = 8 then go card "content5"
  193.   if it = 9 then go card "content6"
  194.   if it = 10 then go card "content7"
  195.   if it = 11 then go card "content8"
  196.   if it = 13 then
  197.     push card
  198.     go card "content0"
  199.   end if
  200.   if it = 14 then
  201.     push card
  202.     go card "index1"
  203.   end if
  204.   if it = 16 then doMenu "Print Card"
  205.  
  206. end mainMenu
  207. --————————————————————————————————————————————————————————————————————
  208. --  handler resets map to no footprints  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  209.  
  210. on resetMap
  211.   global mapCleaning
  212.  
  213.   put "true" into mapCleaning
  214.   lock screen
  215.   push card
  216.   go card "Map"
  217.  
  218.   repeat with x = 1 to 12
  219.     set the style of bkgnd button x to opaque
  220.   end repeat
  221.  
  222.   pop card
  223.   put "false" into mapCleaning
  224.   unlock screen
  225.  
  226. end resetMap
  227. --————————————————————————————————————————————————————————————————————
  228. --  timing for all animation events  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  229.  
  230. on runningPause
  231.  
  232.   repeat 250
  233.     if the mouse is down then
  234.       click at the clickloc
  235.       exit to HyperCard
  236.     end if
  237.   end repeat
  238.  
  239. end runningPause
  240. --————————————————————————————————————————————————————————————————————
  241. --  End Stack Script  ‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî‚Äî
  242. --————————————————————————————————————————————————————————————————————
  243.  
  244.